<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Check whether the RAR archive is solid</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="rararchive.isbroken.html">RarArchive::isBroken</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="rararchive.open.html">RarArchive::open</a></div>
 <div class="up"><a href="class.rararchive.html">RarArchive</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="rararchive.issolid" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">RarArchive::isSolid</h1>
  <h1 class="refname">rar_solid_is</h1>
  <p class="verinfo">(PECL rar &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">RarArchive::isSolid</span> -- <span class="refname">rar_solid_is</span> &mdash; <span class="dc-title">Check whether the RAR archive is solid</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-rararchive.issolid-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格 (method):</p>
   <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>RarArchive::isSolid</strong></span>
    ( <span class="methodparam">void</span>
    )</div>

  <p class="para rdfs-comment">过程化风格:</p>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>rar_solid_is</strong></span>
    ( <span class="methodparam"><span class="type"><a href="class.rararchive.html" class="type RarArchive">RarArchive</a></span> <code class="parameter">$rarfile</code></span>
   )</div>

  <p class="para rdfs-comment">
   Check whether the RAR archive is solid. Individual file extraction is slower on solid
   archives.
  </p> 
 </div>


 <div class="refsect1 parameters" id="refsect1-rararchive.issolid-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">rarfile</code></em></dt>

     <dd>

      <p class="para">
       A <span class="type"><a href="class.rararchive.html" class="type RarArchive">RarArchive</a></span> object, opened with <span class="function"><a href="rararchive.open.html" class="function">rar_open()</a></span>.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-rararchive.issolid-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> if the archive is solid, <strong><code>FALSE</code></strong> otherwise.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-rararchive.issolid-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-729">
    <p><strong>Example #1 面向对象风格</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$arch1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">RarArchive</span><span style="color: #007700">::</span><span style="color: #0000BB">open</span><span style="color: #007700">(</span><span style="color: #DD0000">"store_method.rar"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$arch2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">RarArchive</span><span style="color: #007700">::</span><span style="color: #0000BB">open</span><span style="color: #007700">(</span><span style="color: #DD0000">"solid.rar"</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$arch1</span><span style="color: #DD0000">:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;(</span><span style="color: #0000BB">$arch1</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isSolid</span><span style="color: #007700">()?</span><span style="color: #DD0000">'yes'</span><span style="color: #007700">:</span><span style="color: #DD0000">'no'</span><span style="color: #007700">)&nbsp;.</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$arch2</span><span style="color: #DD0000">:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;(</span><span style="color: #0000BB">$arch2</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isSolid</span><span style="color: #007700">()?</span><span style="color: #DD0000">'yes'</span><span style="color: #007700">:</span><span style="color: #DD0000">'no'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
     </div>

     <div class="example-contents"><p>以上例程的输出类似于：</p></div>
     <div class="example-contents screen">
<div class="cdata"><pre>
RAR Archive &quot;C:\php_rar\trunk\tests\store_method.rar&quot;: no
RAR Archive &quot;C:\php_rar\trunk\tests\solid.rar&quot;: yes
</pre></div>
    </div>
   </div>
  </p>
  <p class="para">
   <div class="example" id="example-730">
    <p><strong>Example #2 过程化风格</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$arch1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">rar_open</span><span style="color: #007700">(</span><span style="color: #DD0000">"store_method.rar"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$arch2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">rar_open</span><span style="color: #007700">(</span><span style="color: #DD0000">"solid.rar"</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$arch1</span><span style="color: #DD0000">:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;(</span><span style="color: #0000BB">rar_solid_is</span><span style="color: #007700">(</span><span style="color: #0000BB">$arch1</span><span style="color: #007700">)?</span><span style="color: #DD0000">'yes'</span><span style="color: #007700">:</span><span style="color: #DD0000">'no'</span><span style="color: #007700">)&nbsp;.</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$arch2</span><span style="color: #DD0000">:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;(</span><span style="color: #0000BB">rar_solid_is</span><span style="color: #007700">(</span><span style="color: #0000BB">$arch2</span><span style="color: #007700">)?</span><span style="color: #DD0000">'yes'</span><span style="color: #007700">:</span><span style="color: #DD0000">'no'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
     </div>

   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="rararchive.isbroken.html">RarArchive::isBroken</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="rararchive.open.html">RarArchive::open</a></div>
 <div class="up"><a href="class.rararchive.html">RarArchive</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
